﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="AdminMenu.ascx.cs" Inherits="SBACN.WebSite.UC.AdminMenu" %>
<div id="left_Div" runat="server" enableviewstate="false" clientidmode="Static">
</div>
<script type="text/javascript">
	var accordion;
	var accordionTogglers;
	var accordionContents;

//	var accordionChild;
//	var accordionChildTogglers;
//	var accordionChildContents;

	window.onload = function () {
		accordionTogglers = document.getElementsByClassName('topmenu');
		accordionTogglers.each(function (toggler) {
		});
		accordionContents = document.getElementsByClassName('leftLevel2');
		accordion = new Fx.Accordion(accordionTogglers, accordionContents, {
			onActive: function (toggler) { }, onBackground: function (toggler) { }
		});
		accordion.showThisHideOpen(<%= MenuIndex%>);
		//accordion.showThisHideOpen(1);
		//		accordionChildTogglers = document.getElementsByClassName('childMain');
		//		accordionChildTogglers.each(function (toggler) {
		//		});
		//		accordionChildContents = document.getElementsByClassName('childLevel2');
		//		accordionChild = new Fx.Accordion(accordionChildTogglers, accordionChildContents, {
		//			onActive: function (toggler) { }, onBackground: function (toggler) { }
		//		});
	}
	function ShowMenu(code)
	{
		var children = document.getElementsByClassName('childLevel2');
		for(var i = 0; i < children.length; i++)
		{
			if(children[i].id == code)
			{
				$jqy(children[i]).show();
			}
			else if(children[i].id.substring(0,children[i].id.length -4) == code.substring(0,code.length -4))
			{
				$jqy(children[i]).hide();
			}
		}
	}

	function MenuClick(sender)
	{
		var menuList = $jqy("#left_Div a");
		for(var i=0; i < menuList.length; i++)
		{
			$jqy(menuList[i]).removeAttr("style");
		}
		$jqy(sender).attr("style","color:#000080;");
	}
</script>